package pro.softzhang.algo.lc2400;


import pro.softzhang.algo.flag.knowledge.KString;

/**
 *
 */
@KString
public class LC2496_MaximumValueOfAStringInAnArray {
    public static void main(String[] args) {

    }

    static
    class Solution {
        public int maximumValue(String[] strs) {
            int max = 0;
            for (String str : strs) {
                max = Math.max(max, getVal(str));
            }
            return max;
        }

        private int getVal(String str) {
            for (char ch : str.toCharArray()) {
                if (!Character.isDigit(ch)) {
                    return str.length();
                }
            }
            return Integer.parseInt(str);
        }
    }
}
